﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace CafeOnline.Common.Criteria {
    [Serializable]
    public abstract class BaseCriteria {
        public BaseCriteria() {
            InitDefaultSort();
            IsActive = true;
        }
        public bool IsActive { get; set; }
        public int Take { get; set; }
        public int Skip { get; set; }
        public Sorting Sorting { get; set; }
        protected abstract void InitDefaultSort();
    }

    public class Sorting {
        public string Column { get; set; }
        public SortDirection Direction { get; set; }
    }

    public enum SortDirection {
        Asc,
        Desc
    }
}
